<template>
  <div class="app_inner_frame">
    <router-view></router-view>
  </div>
</template>

<script setup>
import { onMounted } from 'vue';
import Login from './page/Login.vue';
import { RouterView } from 'vue-router'
import { UserInfoStore } from './stores/userInfo.js'
import { LocalGetPro } from './Util/SaveUtil.js'
const store = UserInfoStore()

onMounted(() => {
  InitStore()
})

const InitStore = () => {
  //尝试读取本地加载仓库
  LocalGetPro('UserStore').then(res => {
    if (res == null)return;
    let data=JSON.parse(res)
    store.loginStatus=data.loginStatus
    store.userInfo=data.userInfo
  }).catch(err => {
    console.err('读取出错')
  })
}
</script>


<style scoped lang="less">
.app_inner_frame {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
</style>
